"""
 Flash OS Routines (Automagically Generated)
 Copyright (c) 2017-2017 ARM Limited
"""

flash_algo = {
    'load_address' : 0x20000000,
    'instructions' : [
        0xE00ABE00, 0x062D780D, 0x24084068, 0xD3000040, 0x1E644058, 0x1C49D1FA, 0x2A001E52, 0x4770D1F2,
        0x4770BA40, 0x4770BAC0, 0x0030EA4F, 0x00004770, 0x4603B510, 0x7080F44F, 0x60204CF0, 0x680048F0,
        0x0007F040, 0x60204CEE, 0x616048EE, 0x48ECBF00, 0xF0006900, 0x28000001, 0x48EBD1F9, 0x60604CE8,
        0x606048EA, 0x4CEA48E7, 0xBF006020, 0x1F0048E8, 0xF0006800, 0x28000001, 0x48E3D1F8, 0x3C104CE4,
        0x48E26020, 0xF8C44CDE, 0x20000104, 0x4601BD10, 0x68C048DB, 0x0001F040, 0x60D04AD9, 0x380848DC,
        0xF0406800, 0xF8C20001, 0x2000010C, 0x48D54770, 0x614849D3, 0x48D2BF00, 0xF0006900, 0x28000001,
        0x48D0D1F9, 0x600849D2, 0x48D1BF00, 0x68001F00, 0x0001F000, 0xD1F82800, 0x48C9BF00, 0xF0006900,
        0x28000001, 0x48C6D1F9, 0xF02068C0, 0x49C40030, 0x460860C8, 0xF04068C0, 0x60C80008, 0x68C04608,
        0x0080F040, 0xBF0060C8, 0x690048BD, 0x0001F000, 0xD1F92800, 0x68C048BA, 0x0008F020, 0x60C849B8,
        0x48BBBF00, 0x68001F00, 0x0001F000, 0xD1F82800, 0x380848B7, 0xF0206800, 0x49B10030, 0x010CF8C1,
        0xF8D04608, 0xF040010C, 0xF8C10008, 0x4608010C, 0x010CF8D0, 0x0080F040, 0x010CF8C1, 0x48ACBF00,
        0x68001F00, 0x0001F000, 0xD1F82800, 0x380848A8, 0xF0206800, 0x49A20008, 0x010CF8C1, 0x47702000,
        0x4601B510, 0x4243F3C1, 0x6F00F1B1, 0xF1B1D337, 0xD2346F01, 0x6940489A, 0x43184B9A, 0x61584B98,
        0x4897BF00, 0xF0006900, 0x28000001, 0x4894D1F9, 0xF64768C0, 0x43987330, 0x60D84B91, 0x68C04618,
        0xEA432304, 0x43182302, 0x60D84B8D, 0x68C04618, 0x0080F040, 0xBF0060D8, 0x69004889, 0x0001F000,
        0xD1F92800, 0x68C04886, 0x0004F020, 0x60D84B84, 0x69004618, 0x0001F000, 0x2001B3F0, 0x4884BD10,
        0x4B806800, 0x4B7E4318, 0x0114F8C3, 0x4880BF00, 0x68001F00, 0x0001F000, 0xD1F82800, 0x3808487C,
        0xF6476800, 0x43987330, 0xF8C34B75, 0x4878010C, 0x68003808, 0x0308F1A2, 0xEA442404, 0x43182303,
        0xF8C34B6F, 0x4618010C, 0x010CF8D0, 0x0080F040, 0x010CF8C3, 0x486EBF00, 0x68001F00, 0x0001F000,
        0xD1F82800, 0x3808486A, 0xF0206800, 0x4B640004, 0x010CF8C3, 0xE0004866, 0x1F00E006, 0xF0006800,
        0xB1080001, 0xE7B92001, 0xE7B72000, 0x4603B5F0, 0x4616460C, 0x46354619, 0xF1B32200, 0xD30D6F00,
        0x6F01F1B3, 0xBF00D20A, 0x69004855, 0x0001F000, 0xD1F92800, 0x4F524853, 0xE00A6178, 0x4854BF00,
        0x68001F00, 0x0001F000, 0xD1F82800, 0x4F50484D, 0xE08D6038, 0x6F00F1B3, 0xF1B3D30C, 0xD2096F01,
        0x68C04847, 0x7730F647, 0x4F4543B8, 0x200260F8, 0xE00C60F8, 0x38084846, 0xF6476800, 0x43B87730,
        0xF8C74F3F, 0x2002010C, 0x3F084F41, 0x2C206038, 0x2200D30C, 0x682FE006, 0x600F6868, 0x35086048,
        0x1C523108, 0xDBF62A04, 0xE0133C20, 0xE0042200, 0x0B01F815, 0x0B01F801, 0x42A21C52, 0x2200D3F8,
        0x20FFE003, 0x0B01F801, 0xF1C41C52, 0x42900020, 0x2400D8F7, 0xBF00BF00, 0xF3BFBF00, 0xBF008F4F,
        0xBF00BF00, 0x6F00F1B3, 0xF1B3D30A, 0xD2076F01, 0x4823BF00, 0xF0006900, 0x28000001, 0xE007D1F9,
        0x4823BF00, 0x68001F00, 0x0001F000, 0xD1F82800, 0x6900481B, 0xB1B02000, 0x6F00F1B3, 0xF1B3D309,
        0xD2066F01, 0x68C04816, 0x0002F020, 0x60F84F14, 0x4817E007, 0x68003808, 0x0002F020, 0xF8C74F10,
        0x2001010C, 0xF1B3BDF0, 0xD3096F00, 0x6F01F1B3, 0x480BD206, 0xF02068C0, 0x4F090002, 0xE00760F8,
        0x3808480B, 0xF0206800, 0x4F050002, 0x010CF8C7, 0xF47F2C00, 0x2000AF6F, 0x0000E7E4, 0x58024594,
        0x52002000, 0x0FEF0000, 0x45670123, 0xCDEF89AB, 0x52002114, 0x00000000
    ],

    'pc_Init'            : 0x20000031,
    'pc_UnInit'          : 0x2000008F,
    'pc_EraseSector'     : 0x20000181,
    'pc_ProgramPage'     : 0x2000028D,
    'pc_Verify'          : 0x12000001F,
    'pc_EraseChip'       : 0x200000AF,
    'pc_BlankCheck'      : 0x12000001F,
    'pc_Read'            : 0x12000001F,
    
    'static_base'        : 0x20000400,
    'begin_data'         : 0x20000800,
    'begin_stack'        : 0x20001000,

    'analyzer_supported' : False,

    # Relative region addresses and sizes
    'ro_start'           : 0x00000000,
    'ro_size'            : 0x000003F4,
    'rw_start'           : 0x000003F4,
    'rw_size'            : 0x00000004,
    'zi_start'           : 0x000003F8,
    'zi_size'            : 0x00000000,

    # Flash information
    'flash_start'        : 0x08000000,
    'flash_size'         : 0x00200000,
    'flash_page_size'    : 0x00000400,
}
